package jnpf.message.projucer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Slf4j
@Component
public class FlowEventProducer {

    @Resource
    private RabbitTemplate rabbitTemplate; // 重点：注入 RabbitTemplate 对象


    public void sendMessage(String routingKey,Object message) {
        rabbitTemplate.convertAndSend(routingKey, message);
    }

}